<?php
/**
Version 0.1
SEMF - Web Desiging Framework for Sport Event Managment
Copyright (C) 2006, SEMF Developers

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
// Loading all the components

if(!isset($semf_root) )
{
	$semf_root = '../';
	// Define that we are returning XML content & not to cache:
	header('Content-Type: text/xml');
	header('Cache-control: no-cache');
}
include_once($semf_root."page_designer/util/component_loader.php");

$component_dirs = load_components($semf_root);


/** generate html for view of the component */
foreach($component_dirs as $component)
{
	$visible_str = "";
	if( $component == "Page")
	{
		$visible_str = "visibility:hidden;position:absolute";
	}
	
	/*echo "
		<div id=\"component__$component\" style=\"cursor:move; $visible_str \">
			<div>
				<div style=\"float:left; width: 20px;\">
					<img src=\"components/$component/icon.gif\"/>
					</img>
				</div>
				<div style=\"float:left; font-size:12\">
					$component
				</div>
			</div>
		</div>
		"; */
	
	echo "
		<div id=\"component__$component\" style=\"cursor:move; $visible_str \">
			<table><tr>
			<td>
				<img src=\"components/$component/icon.gif\"/>
				</img>
			</td>
			<td style=\"font-size:12\">
				$component
			</td>
			</tr></table>
		</div>
		"; 
	
}

?>
